<?php
class IndexController extends Nguyen_Controller_Action{
	public function init(){
		$this->loadTemplate('default');
		$model = new Administrator_Model_News_View();
		$info = $model->GetSiteInfo();
		$this->view->headMeta()->appendName('keywords', $info['meta']);
        $this->view->headMeta()->appendName('description', $info['description']);
        $this->view->headTitle($info['sitename'],true);
	}
	public function indexAction(){ 
		$model = new Administrator_Model_System();
		echo $model->Translate(4);
	}	
	public function websitecloseAction(){
		$this->_helper->layout()->disableLayout(); 
        $this->_helper->viewRenderer->setNoRender(true);
        $model = new Administrator_Model_System();
        $info = $model->GetSiteInfo();        
        echo '<p class="notice">'.$info['offnotice'].'</p>';
        $this->view->headTitle('Thông báo',true);
	}
	public function testAction(){ 
		$this->_helper->layout()->disableLayout(); 
        $this->_helper->viewRenderer->setNoRender(true);
		$model = new Administrator_Model_System();
		$sql = 'select news_content.*  from news_content,language_content where news_content.content=language_content.id and language_content.vi like "%thuế%" ';
		echo '<pre>';
		print_r($model->db->fetchAll($sql));
		echo '</pre>';
	}
}